<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>精羽门-羽毛球爱好者的江湖</title>
    <!-- Bootstrap core CSS -->
    <link href="__PUBLIC__/Css/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/Css/startbbs.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/Css/allan.css">

    <link rel="stylesheet" href="__PUBLIC__/Css/bootstrap-datetimepicker.min.css">
</head>
<body>
<!-- Static navbar -->
<div class="navbar navbar-default navbar-static-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">精羽门</a>
    </div>
    <div class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li id='nav_index'><a href="/">首页</a></li>
        <li id='nav_about'><a href="<?php echo U('Index/about');?>">关于</a></li>
        <li id="nav_act_add"><a href="<?php echo U('Activity/add');?>">发起活动</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <?php if ($_SESSION['uname']) : ?>
        	<li><a href='#'>欢迎<?php echo $_SESSION['uname']; ?></a></li>
        	<li><a href='<?php echo U('Login/logout');?>'>注销</a></li>
        <?php else : ?>
        	<li id='nav_login'><a href='<?php echo U('Login/login');?>'>登录</a></li>
			<li id='nav_reg'><a href='<?php echo U('Login/register');?>'>注册</a></li>
		<?php endif; ?>	
      </ul>
    </div><!--/.nav-collapse -->
  </div>
</div>
<div id="wrap">
	<div class="container" id="page-main">
		<div class="row">
			<div class='col-xs-12 col-sm-6 col-md-8'>
				<div class='box'>
					<div class='cell'>
						<a href="" class="startbbs"></a>
						<span class="chevron">&nbsp;›&nbsp;</span> 发起活动
					</div>
					<div class='inner'>
						<form accept-charset="UTF-8" action="<?php echo U('saveOrUpdate');?>"
							class="form-horizontal" id="form_act" method="post"
							novalidate="novalidate">
							<input type="hidden" id="id" name="id" value="<?php echo ($activity["id"]); ?>"/>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="user_nickname">活动类型</label>
								<div class="col-sm-5">
									<select name="typeCode" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
										<option value="badminton">羽毛球</option>
										<option value="billiards">桌球</option>
										<option value="swimming">游泳</option>
										<option value="other">其他</option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="title">活动标题</label>
								<div class="col-sm-7">
									<input autofocus="autofocus" class="form-control"
										id="title" name="title" size="50" type="text"
										value="<?php echo ($activity["title"]); ?>" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="address">活动地点</label>
								<div class="col-sm-7">
									<input autofocus="autofocus" class="form-control"
										id="address" name="address" size="50" type="text"
										value="<?php echo ($activity["address"]); ?>" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="startTime">开始时间</label>
				                <div id="div_startTime" class="input-group date form_datetime col-sm-7" data-date-format="yyyy-mm-dd hh:ii" data-link-field="dtp_input1">
				                    <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
				                    <input  id="startTime" name="startTime" class="form-control" type="text" readonly value="<?php echo ($activity["startTime"]); ?>">
				                </div>
							</div>	
							<div class="form-group">
								<label class="col-sm-3 control-label" for="endTime">结束时间</label>
				                <div id="div_endTime" class="input-group date form_datetime col-sm-7" data-date-format="yyyy-mm-dd hh:ii" data-link-field="dtp_input1">
				                    <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
									<input id="endTime" name="endTime" class="form-control" type="text" readonly value="<?php echo ($activity["endTime"]); ?>">
				                </div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="maxNum">限制人数</label>
								<div class="col-sm-7">
									<input autofocus="autofocus" class="form-control"
										id="maxNum" name="maxNum" size="50" type="text" value="<?php echo ($activity["maxNum"]); ?>" />
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label" for="detail">活动详情</label>
								<div class="col-sm-7">
									<textarea autofocus="autofocus" class="form-control"
										name="detail" size="50" type="text" rows="5"><?php echo ($activity["detail"]); ?></textarea>
								</div>
							</div>								
							<div class='form-group'>
								<div class="col-sm-offset-3 col-sm-9">
									<span id="submit_form" class="btn btn-primary">发布</span>
								</div>
							</div>
							</form>

						</div>
					</div>

				</div>
				<div class='col-xs-12 col-sm-6 col-md-4' id='Rightbar'>
					<div class="box">
						<div class="cell">活动发布说明</div>
						<div class="inner">
						  <h5>1、活动标题、地点、开始时间、结束时间为必填项</h5>
						</div>
					</div>
				</div>
			</div>
			<hr>
<footer>
  <p>AntsClub 2013-2014</p>
</footer>
		</div>
	</div>

	<script src="__PUBLIC__/Js/jquery-1.8.0.min.js"></script>
<script src="__PUBLIC__/Js/bootstrap.min.js"></script>
	<script type="text/javascript" src='__PUBLIC__/Js/bootstrap-datetimepicker.min.js'></script>
	<script type="text/javascript" src='__PUBLIC__/Js/act_add.js'></script>

</body>
</html>